--[[
-- Author:      feilong
-- DateTime:    2018-04-23 17:19:33
-- Description: 
	模拟客户端
	1加载proto
	2连接tcp
	3登录测试
--]]


---------------------------------------------------------
-- class
---------------------------------------------------------
local Service = class("UI")

function Service:ctor(name)

    self.handler = new("client.handler")
    self.ui = new("client.screne")
    self.const = new("client.constant")
    self:register()
end

function Service:register()
    g.dispatch:register('start', handler(self, self.onStart))
    g.dispatch:register('close', handler(self, self.onClose))

end

function Service:onStart()
    --self.handler:onStart()
    self.ui:onStart()

    return true
end

function Service:onClose()

    self.ui:onClose()
    return true
end


return Service
